<include file="public@header" />
</head>

<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('AdminCardType/index')}">礼券信息</a></li>
			<li class="active"><a>新增礼券</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('AdminCardType/addpost')}">
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>名称
				</label>
				<div class="col-md-3 col-sm-10">
					<input type="text" class="form-control" name="name">
				</div>
				<label class="col-sm-2 control-label">
					规格
				</label>
				<div class="col-md-3 col-sm-10">
					<input type="text" class="form-control" name="spk">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 control-label">
					图片
				</label>
				<div class="col-md-3 col-sm-10">
					<input type="hidden" name="img" id="cardimg" value="">
					<a href="javascript:uploadOneImage('图片上传','#cardimg');">
						<img src="__TMPL__/public/assets/images/default-thumbnail.png" id="cardimg-preview" width="135" style="cursor: pointer" />
					</a>
					<input type="button" class="btn btn-sm" 
						onclick="$('#cardimg-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#cardimg').val('');return false;"
						value="取消图片">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					描述
				</label>
				<div class="col-md-8 col-sm-10">
					<textarea name="desc" class="form-control"rows="10"></textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="{:url('menu/index')}">{:lang('BACK')}</a>
				</div>
			</div>

		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>

</html>